package com.swust.ipmsg.util;

import java.io.Serializable;
import java.net.InetAddress;
import java.net.InetSocketAddress;

import android.content.Context;


public class Person implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private int userId;
	private String useName;
	private String hostName;
	private String ipAddress;// IP地址
	private String macAddress;
	
	public Person(){
		
	}
	public Person(Context context){
		DeviceInfor deviceInfor = new DeviceInfor(context);
		useName = deviceInfor.getTeleType();
		hostName = deviceInfor.getTeleType();
		//因为局域网内每个人的IP总是不同的（IP冲突的情况不算，当然，冲突的时候通信是错误的）。
		userId = deviceInfor.getIpAddress();
		ipAddress = IPv4Util.intToIp(deviceInfor.getIpAddress());
		macAddress = deviceInfor.getMac();
	}

	public int getUserId() {
		return userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	public String getUseName() {
		return useName;
	}

	public void setUseName(String useName) {
		this.useName = useName;
	}

	public String getHostName() {
		return hostName;
	}

	public void setHostName(String hostName) {
		this.hostName = hostName;
	}

	public String getIpAddress() {
		return ipAddress;
	}

	public void setIpAddress(String ipAddress) {
		this.ipAddress = ipAddress;
	}

	public String getMac() {
		return macAddress;
	}

	public void setMac(String mac) {
		this.macAddress = mac;
	}
	
	
	
	
	
}
